import * as THREE from 'three';
import * as CANNON from "cannon-es";
// import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js'
const model = new THREE.Group();
// 1m半径球体
const bodyShape = new CANNON.Sphere(1);
const body = new CANNON.Body({
    mass: 0.3,
     // 碰撞体的三维空间中位置
    position: new CANNON.Vec3(0, 100, 0),
    shape: bodyShape,
});
const world = new CANNON.World()
world.gravity.y = -9.8
world.addBody(body);
function render(){
    // console.log('小球的位置',body.position);
    // console.log('小球的速度',body.velocity);
    world.step(1/60)
    requestAnimationFrame(render)
}
render()
export default {model}; 